package cn.da.shuai.cool.system.model.entity.online;

import cn.da.shuai.cool.common.entity.EntityBase;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "在线用户记录")
public class CoolUserOnline extends EntityBase {

    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键")
    private Long id;

    @Schema(description = "用户会话id")
    private String sessionId;

    @Schema(description = "登录账号")
    private String loginName;

    @Schema(description = "部门名称")
    private String deptName;

    @Schema(description = "登录IP地址")
    private String ipaddr;

    @Schema(description = "登录地点")
    private String loginLocation;

    @Schema(description = "浏览器类型")
    private String browser;

    @Schema(description = "操作系统")
    private String os;

    @Schema(description = "在线状态on_line在线off_line离线")
    private String status;

    @Schema(description = "session创建时间")
    private LocalDateTime startTimestamp;

    @Schema(description = "session最后访问时间")
    private LocalDateTime lastAccessTime;

    @Schema(description = "超时时间，单位为分钟")
    private Integer expireTime;
}